package com.zhuoyue.biz.core.api.dto.rep;

import com.zhuoyue.biz.core.api.domain.InfraredDeviceDO;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.util.List;

/**
 * @author wjming
 * @ClassName: InfraredDeviceRepDTO
 * @Description: 红外设备回应DTO
 * @Date 2021-07-08 10:25
 */
@Data
public class InfraredDeviceRepDTO extends BaseRepDTO {

    private String homeId;
    /**
     * 红外学习仪设备id
     */
    private String deviceId;


    private String roomId;

    private String roomName;

    /**
     * 红外设备名称
     */

    private String name;

    /**
     * 4：普通空调；5：电视；6：风扇；7：中央空调
     */

    private Integer type;

    /**
     * 中央空调编号
     */

    private String centralAcCode;

    private String imgUrl;

    /**
     * 小黑豆返回action
     */
    private String actions;


    private String deviceType;
    /**
     * 产品信息
     */
    private ProdInformation prodInformation;

    /**
     * 红外设备信息DTO返回
     *
     * @param infraredDeviceDO
     * @return
     */
    public InfraredDeviceRepDTO doToDto(InfraredDeviceDO infraredDeviceDO, List<String> functionList) {
        BeanUtils.copyProperties(infraredDeviceDO, this);
        this.prodInformation = new ProdInformation().getInformation(functionList);
        return this;
    }

}
